package com.smart.manager.finance.entities.models;


import com.smart.common.entities.core.BaseLongModel;
import com.smart.manager.finance.entities.enums.AppType;
import com.smart.manager.finance.entities.enums.PayPlatform;
import com.smart.manager.finance.entities.enums.PayState;
import com.smart.manager.member.entities.views.MemberView;
import com.smart.wap.bodys.OpenIdKind;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 支付中心-支付宝配置
 *
 * @author Administrator
 * @date 2022/10/31
 */
@Getter
@Setter
@Entity
@Accessors(chain = true)
public class FinanceOrderCoin extends BaseLongModel {


    @ApiModelProperty("支付平台")
    private PayPlatform payPlatform;

    @ApiModelProperty("应用类型")
    private AppType appType;

    @ApiModelProperty("应用ID")
    private String appId;


    @ApiModelProperty("会员信息")
    @ManyToOne
    @JoinColumn(name = "member" , referencedColumnName = "id")
    private MemberView member;


    @ApiModelProperty("金币价目表")
    private Long tariff;


    @ApiModelProperty("支付金额")
    private BigDecimal fee;

    @ApiModelProperty("玩家获得金币数量")
    private Integer coinTotal;

    @ApiModelProperty("支付状态")
    private PayState payState;


    @ApiModelProperty("支付创建时间")
    private LocalDateTime actionTime;

    @ApiModelProperty("支付完成时间")
    private LocalDateTime finishTime;

    @ApiModelProperty("OPENID 类型")
    private OpenIdKind openIdKind;

    @ApiModelProperty("支付人的OPENID")
    private String openId;

    @ApiModelProperty("订单编号")
    private String orderId;

    @ApiModelProperty("平台流水号")
    private String transactionId;

    @ApiModelProperty("附加数据")
    private String attached;


}
